/**
 *
 */
package tao.data.structure.tree;

import java.util.List;

/**
 * The implementation of Tree interface 
 */
public class ConcreteTree<V> extends AbstractTree<V> {
	public ConcreteTree(Tree<V> tree) {
		super(null);
		Tree<V> tmp = buildFrom(tree, new TreeCreation<V>());
		setValue(tmp.getValue());
		subtree = new ConcreteTrees<V>(tmp.getSubtree());
	}
	
	public ConcreteTree(V value) {
		this(value, new ConcreteTrees<V>());
	}

	public ConcreteTree(V value, Trees<V> trees) {
		super(value);
		this.subtree = new ConcreteTrees<V>(trees);
	}
		
	public ConcreteTree(V value, Tree<V>[] trees) {
		super(value);
		this.subtree = new ConcreteTrees<V>(trees);
	}
	
	public ConcreteTree(V value, List<Tree<V>> treeList) {
		super(value);
		this.subtree = new ConcreteTrees<V>(treeList);
	}	
	
	@Override
	public Trees<V> getSubtree() {
		return(subtree);
	}

	protected ConcreteTrees<V> subtree;	
}